package com.nami.message.acl.repository.inbox.convertor;

import com.nami.message.domain.model.pmsg.PChatMsgModel;
import com.nami.message.core.mybatis.dataobject.inbox.InboxMsgsDO;

public class Model2InBoxDOConvertor {

    public static InboxMsgsDO toDO(final PChatMsgModel model) {
        InboxMsgsDO inboxMsgs = new InboxMsgsDO();
        inboxMsgs.setMsgId(model.getMessageId());
        inboxMsgs.setUserId(model.getReceiverId());
        inboxMsgs.setTargetId(model.getSenderId());
        inboxMsgs.setAppKey(model.getAppKey());
        inboxMsgs.setPayload(model.getPayload());
        inboxMsgs.setPayloadType(model.getPayloadType());
        inboxMsgs.setSendTime(model.getSendTime());
        inboxMsgs.setConverType(1); // c2c
        return inboxMsgs;
    }

}
